<link rel="stylesheet" href="../core/resource/weui/weui.css">
<div class='fui-page-group' ng-if="pagedata.op=='list'">
<div class='fui-page  fui-page-current'>
    <div class="fui-header">
		<div class="fui-header-left" onclick="window.history.go(-1);">
            <a class="back"></a>
        </div>
		<div class="title">我的挪车卡</div>
		<div class="fui-header-right"></div>
	</div>
	<div class="fui-list-group merchgroup" style="margin-top:60px">
        <div class="weui_cells weui_cells_form">
            <div class="weui_cell weui_cell_switch" ng-repeat="item in pagedata.list">
                <div class="weui_cell_hd weui_cell_primary" style="line-height:1.4rem" ng-click="pagedata.title=item.title;pagedata.linkurl=item.linkurl;qrcode(pagedata,'linkurl')" data-toggle="modal" data-target="#followewm"><i class="icon jinyunicon icon-erweima" alt="" style="width:20px;margin-right:5px;font-size:1rem;float:left"></i> {{item.title || '未命名'}}</div>
                <div class="weui_cell_bd weui_cell_primary">
                    <span>{{item.createtime}}</span>
                </div>
				<div class="weui_cell_ft">
                    <input class="weui_switch" ng-model="item.status" ng-click="post({'status':item.status},'set','id='+item.id)" type="checkbox">
                </div>
            </div>
		</div>
	</div>
	<div class="content-empty" ng-show="pagedata.list.length == 0 ">
		  <i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">您暂时没有挪车卡(收到挪车卡后,要扫码激活这里才会显示)！</p>
	</div>
	<div class="weui_btn_area">
			<a class="weui_btn weui_btn_primary" href="javascript:;" ng-click="access_json('jy_move/order/add')"><i class="icon jinyunicon icon-jia" style="width: 2rem;"></i>申请挪车卡</a>
	</div>
</div>
<div id="followewm"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
		<div class="modal-dialog" style="margin-bottom:216px">
				<div class="wap-qrcode-container">
					<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
					<p class="example1">{{pagedata.title || '没有命名'}}</p>
					<div class="wap-qrcode-image" id="qrcode-linkurl">
					</div>
					<p class="example1">长按二维码下载</p>
				</div>
		</div>
</div>
</div>

<div ng-if="pagedata.op=='edit'">
	<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true" style="touch-action: pan-y; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">
		<div class="carousel-inner" role="listbox" style="height:160px">
			<div ng-repeat="banner in pagedata.basic.hdps" ng-class="{'item':true,'active':$index==0}" class="item next left">
				<a href="{{item.url}}">
					<img ng-src="{{tomedia(item.picurl) || '../core/resource/images/diy/default/banner-1'}}" style="display: block; width: 100%; height: auto;">
				</a>
			</div>
		</div>
		<style>
				.fui-swipe-page .fui-swipe-bullet {background: #fff; opacity: {opacity};}
				.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
		</style>
		<div id="carousel-jinyun" class=" fui-swipe-page center rectangle" style="padding: 0 1px; bottom: 1px; ">
			<div class="fui-swipe-bullet" ng-repeat="banner in " data-target="#carousel-container" data-slide-to="{0}" ng-class="{'active':$index==0}"></div>
		</div>
	</div>
	<script>
		require(['bootstrap', 'hammer'], function($, Hammer){
			$('#carousel-container').carousel();
			var mc = new Hammer($('#carousel-container').get(0));
			mc.on("panleft", function(ev) {
				$('#carousel-container').carousel('next');
			});
			mc.on("panright", function(ev) {
				$('#carousel-container').carousel('prev');
			});
		});
	</script>
	<div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">挪车卡名称</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" ng-model="pagedata.item.title" placeholder="给您的挪车卡取个名字">
                </div>
            </div>
	</div>
	<div class="weui_btn_area">
		 <a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" ng-click="post(pagedata.item,'edit')">提交</a>
	</div>
</div>
<div ng-include="sys_html('_footer')"></div>